<?php    
    class Search extends MY_Controller {
    
        function _init() {
            $this->resource = 'search';             
        }
        
        function index() {
            $search = $this->input->post('search');
            $result = $this->db->like('title', $search)->or_like('full_description', $search)->or_like('short_description', $search)->get('stuff')->result_array();            
            $view_data = array(
                'VIEW' => 'search_result',
                'SEARCH_RESULT' => $result,
            );
            $this->load->vars($view_data);
            $this->layout->load('search_result');
        }
    }
?>